﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Text;
using System.Threading.Tasks;

namespace WJP.DataPortal.WCF
{
    /// <summary>
    /// 路由服务接口
    /// </summary>
    [ServiceContract]
    public interface IRoutingService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="callback"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        [OperationContract(AsyncPattern = true, IsOneWay = false, Action = "*", ReplyAction = "*")]
        IAsyncResult BeginProcessRequest(Message message, AsyncCallback callback, object state);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="result"></param>
        /// <returns></returns>
        Message EndProcessRequest(IAsyncResult result);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [OperationContract]
        Message Invoke(Message msg);
    }
}
